package sel.me.spring.boot245.web.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import sel.me.spring.boot245.web.domain.login.LoginUserDto;
import sel.me.spring.boot245.web.entity.User;

/**
 * @author shenenlu
 * @date 2021-7-29 9:00
 */
@Service
public class UserService {


    public User selectOne(QueryWrapper<User> wrapper) {
        User user = new User();
        user.setUserId(1L);
        return user;
    }


    public LoginUserDto getUserInfo(String userNm) {
        LoginUserDto user = new LoginUserDto();
        user.setUsername("aaa");
        user.setPassword(new BCryptPasswordEncoder().encode("123"));
        user.setUserId(1L);
        return user;
    }
}
